package com.security.door.service.Impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.security.door.core.base.BaseService;
import com.security.door.dao.mapper.visitorTripMapper;
import com.security.door.model.domain.visitorTrip;
import com.security.door.model.dto.visitorTripDto;
import com.security.door.model.vo.visitorTripVo;
import com.security.door.service.IvisitorTripService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class visitorTripServiceImpl extends BaseService<visitorTrip> implements IvisitorTripService {

    @Autowired
    visitorTripMapper ivisitorTripMapper;

    public PageInfo<visitorTripVo> queryListWithPage(visitorTripDto entity) {
        PageHelper.startPage(entity.getPageIndex(), entity.getPageSize());
        var actionList = ivisitorTripMapper.queryListWithPage(entity);
        return new PageInfo<>(actionList);
    }

    public List<visitorTrip> selectByStart(visitorTrip entity) {
        return ivisitorTripMapper.selectByStart(entity);
    }
}
